﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Peninsula.Common
{
   public  interface ISiteCache
    {

        T Get<T>(string key, Func<T> getter, TimeSpan slidbing = default(TimeSpan), bool updateExpiredTime = false, bool refresh = false) where T : class;

        void Set<T>(string key, T value, TimeSpan slibing = default(TimeSpan)) where T : class;

        bool TryGet<T>(string key, out T value) where T : class;

        void Remove(string key);
    }
}
